From: Florian Müllner Date: Fri, 19 Jan 2024 21:56:59 +0000 (+0100) Subject: util: Handle .rc in version comparisons X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~111 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=79b0c9c7266e804e7523dc024b8192576389c704;p=gnome-shell.git util: Handle .rc in version comparisons We somehow missed that the new version scheme include '.rc' when adding the comparison function, whoops. Part-of: --- diff --git a/js/misc/util.js b/js/misc/util.js index de5e6d861..508c87d24 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -294,8 +294,10 @@ function _GNOMEversionToNumber(version) { if (!isNaN(ret)) return ret; if (version === 'alpha') - return -2; + return -3; if (version === 'beta') + return -2; + if (version === 'rc') return -1; return ret; } diff --git a/tests/unit/versionCompare.js b/tests/unit/versionCompare.js index 549afeecd..39388a3b0 100644 --- a/tests/unit/versionCompare.js +++ b/tests/unit/versionCompare.js @@ -36,7 +36,7 @@ const tests = [ }, { v1: '40', - v2: '3.38.0', + v2: '40.rc', res: 1, }, {